<template>
  <div>
    <a-card :bordered="false">
      <f-table ref="table" rowKey="reportOutTwoId" :columns="columns" :scroll="{x:newColumns.length*150,y:newColumns.length*35}" :multiple="false"
               :operator="operator" :params="queryParam" :api="api.reportOut2">
      </f-table>
    </a-card>
  </div>
</template>
<script>
  import api from './js/api'

  export default {
    name: 'reportOut2Detail',
    data() {
      //操作按钮
      let operator = []
      return {
        api: Object.assign(api, this.api),
        //列表初始化查询参数
        queryParam: {},
        // 表头
        columns: [
          {
            title: '序号',
            width: 100,
            align: 'center',
            customRender: (text, record, index) => index + 1
          },
          {
            title: '备用',
            align: 'center',
            width: 150,
            dataIndex: 'otherField1'
          },
          {
            title: '项目编码',
            align: 'center',
            width: 150,
            dataIndex: 'projectCode'
          },
          {
            title: '年月',
            align: 'center',
            width: 150,
            dataIndex: 'reportMonth'
          },
          {
            title: '批次',
            align: 'center',
            width: 150,
            dataIndex: 'batchNumber'
          },
          {
            title: '项目名称',
            align: 'center',
            width: 150,
            dataIndex: 'projectName'
          },
          {
            title: '项目特征描述',
            align: 'center',
            width: 150,
            dataIndex: 'projectDesc'
          },
          {
            title: '单位',
            align: 'center',
            width: 150,
            dataIndex: 'unit'
          },
          {
            title: '合同工程量',
            align: 'center',
            width: 150,
            dataIndex: 'contractQuantity'
          },
          {
            title: '合同造价_材料费',
            align: 'center',
            width: 150,
            dataIndex: 'contractCostMaterial'
          },
          {
            title: '合同造价_安装费',
            align: 'center',
            width: 150,
            dataIndex: 'contractCostInstall'
          },
          {
            title: '合同造价',
            align: 'center',
            width: 150,
            dataIndex: '',
            children: [
              {
                title: '单价',
                align: 'center',
                width: 150,
                dataIndex: 'contractSyntheticalPrice'
              },
              {
                title: '总价',
                align: 'center',
                width: 150,
                dataIndex: 'contractCostSynthetical'
              }
            ]
          },
          {
            title: '截止上月已完工程量',
            align: 'center',
            width: 150,
            dataIndex: '',
            children: [
              {
                title: '数量',
                align: 'center',
                width: 150,
                dataIndex: 'lastMonthFinshNum'
              },
              {
                title: '总价',
                align: 'center',
                width: 150,
                dataIndex: 'lastMonthFinshCost'
              },
              {
                title: '百分比',
                align: 'center',
                width: 150,
                dataIndex: 'lastMonthFinshPercentage'
              }
            ]
          },
          {
            title: '本月完成量',
            align: 'center',
            width: 150,
            dataIndex: '',
            children: [
              {
                title: '数量',
                align: 'center',
                width: 150,
                dataIndex: 'nowMonthFinshNum'
              },
              {
                title: '总价',
                align: 'center',
                width: 150,
                dataIndex: 'nowMonthFinshCost'
              },
              {
                title: '百分比',
                align: 'center',
                width: 150,
                dataIndex: 'nowMonthFinshPercentage'
              }
            ]
          },
          {
            title: '截止本期累计',
            align: 'center',
            width: 150,
            dataIndex: '',
            children: [
              {
                title: '数量',
                align: 'center',
                width: 150,
                dataIndex: 'nowPeriodSumNum'
              },
              {
                title: '总价',
                align: 'center',
                width: 150,
                dataIndex: 'nowPeriodSumCost'
              },
              {
                title: '百分比',
                align: 'center',
                width: 150,
                dataIndex: 'nowPeriodPercentage'
              }
            ]
          },
          {
            title: '备注',
            align: 'center',
            width: 150,
            dataIndex: 'remark'
          },
          {
            title: '操作',
            align: 'center',
            width: 150,
            scopedSlots: { customRender: 'action' },
            fixed: 'right'
          }
        ],
        operator: operator
      }
    },
    created() {
      this.queryParam.projectCode = this.$route.query.projectCode
      this.queryParam.reportMonth = this.$route.query.reportMonth
      this.queryParam.batchNumber = this.$route.query.batchNumber
    },
    methods: {
    }
  }
</script>
